<script lang="ts" setup>
import { onMounted, computed } from 'vue'

import Playlist from './Comp/Playlist.vue'
import { useRecommendHook } from '@/store/modules/recommend'

const recommendStore = useRecommendHook()
onMounted(() => {
  recommendStore.initPlaylistData()
})

const highquality = computed(() => recommendStore.highquality)
</script>

<template>
  <div>
    <div class="high_playlist">
      <div class="playlist_image">
        <img :src="highquality?.coverImgUrl" />
      </div>
      <div class="playlist_info">
        <div class="high_button">精品歌单</div>
        <p style="color: #cfd3dc">{{ highquality?.name }}</p>
      </div>
      <img class="cover_image" :src="highquality?.coverImgUrl" />
    </div>
    <Playlist />
  </div>
</template>

<style lang="scss" scoped>
.high_playlist {
  height: 180px;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  padding: 20px;
  display: flex;
  align-items: center;

  .playlist_image {
    position: relative;
    z-index: 1;
    width: 140px;
    height: 140px;
    overflow: hidden;
    border-radius: 10px;
  }
  .playlist_info {
    position: relative;
    z-index: 1;
    margin-left: 40px;
  }
  .high_button {
    width: 100px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 36px;
    color: #d6974a;
    border: 1px solid #d6974a;
    margin-bottom: 20px;
    cursor: pointer;
  }
  .cover_image {
    position: absolute;
    width: 100%;
    height: auto;
    top: 50%;
    left: 50%;
    transform: scale(1.4) translate(-50%, -50%);
    filter: blur(20px) brightness(60%);
  }
}
</style>
